<div class="zs-body" 
	data-ng-init="
		formInit('items', {
			keyField:'itemId',
			randomFields:['itemId'],
			orderObject:{itemId:0} 
		}) && 
		treeFormInit('datajurisdiction', {
			keyField:'id',
			randomFields:['id'],
			orderObject:{order:0},
			pageSize:12,
			maxNavs:3,
			queryFields:'id,display,code,valid,registerService,info,leaf,order',
			treeNavs:[{pid:'0',n:'所有功能'}]
		}) && loadData('datajurisdiction');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a href="javascript:;">首页</a>
            <i class="right-arr"></i>
            <a href="javascript:;">运维管理</a>
            <i class="right-arr"></i>
            <a href="javascript:;">菜单功能注册</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新建" 
                ng-click="addTreeRow('datajurisdiction') && openWindow('edit');"/>
            <input type="button" class="zs-btn orange" value="编辑" 
                ng-click="editRow('datajurisdiction', datajurisdiction.sRows[0]) && openWindow('edit')"/>
            <input type="button" class="zs-btn orange" value="删除 "
                ng-click="delEntitys('datajurisdiction')"/>
        </div>
    </div>
    <div class="zs-content" style="position:unset">
        <div class="zs-nice-tab idTabs">
        	<div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" placeholder="功能名称" class="zs-input" ng-model="datajurisdiction.queryObject['display:like']"/>
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('datajurisdiction')"></a>
                <a class="ope-2"></a>
            </div>
            <div class="tool item" style="width: 380px">
        		<div class="zs-nav">
		    		<a ng-click="preNav('datajurisdiction')">返回上一级</a> | 
		    		<span ng-repeat="r in datajurisdiction.treeNavs">
		    			<a ng-click="indexNav('datajurisdiction',$index)">{{r.n}}</a> 
		    			<label ng-if="$index!=datajurisdiction.treeNavs.length-1"> > </label>
		    		</span>
		    	</div>
        	</div>
            <div class="switch">
            </div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                    	<table>
			                <thead>
			                    <tr>
			                        <th>
			                        	<input id="allCheckbox" type="checkbox"
			                        		ng-click="selectAll('datajurisdiction','allCheckbox');">
			                        </th>
			                        <th>序号</th>
			                        <th>功能名称</th>
			                        <th>功能标识</th>
			                        <th>所属应用系统</th>
			                        <th>是否有效/子节点</th>
			                        <th>备注</th>
			                    </tr>
			                </thead>
			                <tbody>
			                    <tr ng-repeat="r in datajurisdiction.datas">
					                <td><input type="checkbox"
						                    ng-click="selectRow('datajurisdiction',r);"
						                    ng-model="r.selected" />
					                </td>
					                <td>
					                    <a ng-click="!r.leaf && addNav('datajurisdiction',r.id,r.display,r)">
					                        <label ng-bind="r.order"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('datajurisdiction',r) && openWindow('edit');">
					                        <label ng-bind="r.display"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('datajurisdiction',r) && openWindow('edit');">
					                        <label ng-bind="r.code"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('datajurisdiction',r) && openWindow('edit');">
					                        <label ng-bind="r.registerServiceName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('datajurisdiction',r) && openWindow('edit');">
					                        <label ng-bind="r.valid | asChineseBool"></label>
					                        /
					                        <label ng-bind="r.leaf | asChineseBool"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('datajurisdiction',r) && openWindow('edit');">
					                        <label ng-bind="r.info"></label>
					                    </a>
					                </td>
					            </tr>
			                </tbody>
			            </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='datajurisdiction'></ag-Page>
                </div>
            </div>
        </div>

        <div ag-Window id="edit" title="数据功能编辑" width='600px' height='310px'>
	        <div class="zs-form-tab ibox" data-ng-init="iniTab('datatab', 'tab1', 'selected');">
	        	<form name="form" novalidate>
	        		<div class="zs-itab">
						<div class="zs-itab-title">
							<ul class="idTabs">
								<li><a ng-click="setTab('datatab', 'tab1');" 
									class="{{tabs['datatab'].tabClass['tab1']}}">基础信息</a></li>
								<li><a ng-click="setTab('datatab', 'tab2');" 
									class="{{tabs['datatab'].tabClass['tab2']}}">数据权限</a></li>
							</ul>
						</div>
					</div>
					
					<div ng-show="tabs['datatab'].tabShow['tab1']" style="height: 200px">
					    <table width="100%">
					        <tbody>
					        	<tr ng-if="showRegisterService('datajurisdiction',datajurisdiction.editRow)">
					        		<td class="text" width="20%">所属应用系统</td>
			                        <td colspan="3" class="left" width="80%">
			                        	<!-- <ag-Combobox class="zs-input" style="width:458px;height:28px;"
			                        		fn='rs' para="{sn:'registerservice',
														defaultQueryObject:{valid:true},
														orderObject:{order:0}}"
					                        ng-model="datajurisdiction.editRow.registerService"
					                        text-Value="datajurisdiction.editRow.registerServiceName" /> -->

					                    <ag-Combobox class="zs-input" style="width:458px;height:28px;"
			                        		para="{uDictionary:true,dictionary:'p_register_service'}"
					                        ng-model="datajurisdiction.editRow.registerService"
					                        text-Value="datajurisdiction.editRow.registerServiceName" />
			                        </td>
					        	</tr>
					        	<tr ng-if="!showRegisterService('datajurisdiction',datajurisdiction.editRow)">
					        		<td class="text" width="20%" style="height:28px;"></td>
			                        <td colspan="3" class="left" width="80%" style="height:28px;">
			                        </td>
					        	</tr>
					        	<tr>
			                        <td class="text" width="20%">*功能名称</td>
			                        <td class="left" width="30%"><input type="text"
			                            ng-model="datajurisdiction.editRow.display"
			                            class="zs-input" required></td>
			                        <td class="text" width="20%">*功能标识</td>
			                        <td class="left" width="30%"><input type="text"
			                            ng-model="datajurisdiction.editRow.code"
			                            class="zs-input" required></td>
			                    </tr>
			                    <tr>
			                        <td class="text" width="20%"></td>
			                        <td class="left" width="30%">
			                        	<input type="checkbox" ng-model="datajurisdiction.editRow.valid"
			                        		ng-true-value="true" ng-false-value="false" value='false' />
			                        	有效 
			                        	<input type="checkbox" ng-model="datajurisdiction.editRow.leaf"
			                        		ng-true-value="true" ng-false-value="false" value='false' />
			                        	子节点
			                        </td>
			                        <td class="text" width="20%">排序</td>
			                        <td class="left" width="30%"><input type="text"
			                            class="zs-input" ng-model="datajurisdiction.editRow.order">
			                        </td>
			                    </tr>
			                    <tr>
			                        <td class="text" width="20%">描述</td>
			                        <td colspan="3" class="left" width="80%"><input type="text"
			                            class="zs-input" ng-model="datajurisdiction.editRow.info"></td>
			                    </tr>
					        </tbody>
					    </table>
				    </div>

				    <div class="zs-data-tab" ng-show="tabs['datatab'].tabShow['tab2']" style="height: 200px">
					    <table>
					    	<thead>
			                    <tr>
			                    	<th width="15%" style="text-align: center;">
			                        	<input id="itemCheckbox" type="checkbox"
			                        		ng-click="selectAllByList(datajurisdiction.editRow.items,'itemCheckbox');">
			                        </th>
			                        <th width="35%">表名称</th>
			                        <th width="35%">过滤条件</th>
			                        <th width="15%">
			                        	<input type="button" value="-" class="zs-btn c-green" 
					        				style="padding: 0px 0px;width: 30px;margin: 0px"
                            				ng-click="delLocalRows(datajurisdiction.editRow.items)">
                            			<input
                            				type="button" value="+" class="zs-btn c-red"
                            				style="padding: 0px 0px;width: 30px;margin: 0px"
                            				ng-click="addLocalRow(datajurisdiction.editRow,'items','items')">
			                        </th>
			                    </tr>
			                </thead>
					        <tbody>
					        	<tr ng-repeat="r in datajurisdiction.editRow.items">
					        		<td width="15%">
					        			<input type="checkbox"
						                    ng-click="selectRowByList(datajurisdiction.editRow.items,r);"
						                    ng-model="r.selected" />
					                </td>
					        		<td width="35%">
					        			<input type="text" ng-model="r.tableName" class="zs-input" />
					        		</td>
					        		<td colspan="2" width="50%">
					        			<input type="text" ng-model="r.tableWhere" class="zs-input" />
					        		</td>
					        	</tr>
					        </tbody>
					    </table>
				    </div>

				    <div>
				    	<table width="100%">
				    		<tfoot>
				    			<tr>
				    				<td>
				    					<input type="button" name="ok" value="保存" class="zs-btn c-red"
					                    	ng-click="formValidate(form) && save('datajurisdiction', datajurisdiction.editRow, saveCloseWindow)"/>
					                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
					                    	ng-click="closeWindow('edit')" />
				    				</td>
				    			</tr>
				    		</tfoot>
				    	</table>
				    </div>

				</form>
			</div>
	    </div>
    </div>
</div>